<?php
use Illuminate\Database\Seeder;
use App\Models\Administrator;
use Illuminate\Support\Facades\Hash;

class ImportNewAdministrator extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
    	$administrator = Administrator::where('cellphone', 'manager')->first();
		if(is_null($administrator)) {
			Administrator::create([
				'cellphone' => 'manager',
				'password' => Hash::make('Ghlin726'),
				'nickname' => '郭先生',
				'fullname' => '郭先生',
				'avatar' => 'avatar.jpg'
			]);
		}
    }
}
